package com.example.beryl.Util;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * 扫描广播公共类
 */
public class ReceiveBroadCast extends BroadcastReceiver {
    private GetCode code;
    public void setScanHeadListener(GetCode getCode)
    {
        this.code = getCode;
    }
    @Override
    public void onReceive(Context context, Intent intent) {
        code.Getcode(intent.getStringExtra("scannerdata"));
    }
    public interface GetCode{
        void Getcode(String getcode);
    }
}
